<template>
  <view class="container">
    <!-- 顶部玩家信息区域 -->
    <view class="top-section">
      <!-- 己方玩家 -->
      <view class="player-group left">
        <view v-for="i in 5" :key="'ally'+i" class="player-card">
          <view class="avatar" style="background: #888;"></view>
          <view class="loading-bar">
            <view class="progress" style="width: 60%"></view>
          </view>
          <view class="info">
            <text class="name">玩家{{i}}</text>
            <text class="level">Lv.15</text>
          </view>
        </view>
      </view>
      
      <!-- 敌方玩家 -->
      <view class="player-group right">
        <view v-for="i in 5" :key="'enemy'+i" class="player-card">
          <view class="avatar" style="background: #666;"></view>
          <view class="loading-bar">
            <view class="progress" style="width: 40%"></view>
          </view>
          <view class="info">
            <text class="name">对手{{i}}</text>
            <text class="level">Lv.15</text>
          </view>
        </view>
      </view>
    </view>

    <!-- 中间英雄展示区 -->
    <view class="hero-display" style="background: #d9001b;">
      <view class="loading-icon"></view>
      <text class="loading-text">加载中 75%</text>
    </view>

    <!-- 底部阵容展示 -->
    <view class="bottom-section">
      <view class="team ally">
        <view v-for="i in 5" :key="'a'+i" class="hero-placeholder" style="background: #0099ff;"></view>
      </view>
      <view class="vs-text">VS</view>
      <view class="team enemy">
        <view v-for="i in 5" :key="'e'+i" class="hero-placeholder" style="background: #aa00ff;"></view>
      </view>
    </view>
  </view>
</template>

<style scoped>
.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #1a1a1a;
}

/* 顶部区域 */
.top-section {
  height: 40vh;
  display: flex;
  justify-content: space-between;
  padding: 20rpx;
}

.player-group {
  width: 48%;
}

.player-card {
  height: 16%;
  margin: 5rpx 0;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 10rpx;
}

.avatar {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  margin: 0 20rpx;
}

.loading-bar {
  flex: 1;
  height: 20rpx;
  background: #333;
  border-radius: 10rpx;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: #00ff7f;
  transition: width 0.3s;
}

.info {
  margin-left: 20rpx;
  display: flex;
  flex-direction: column;
}

.name {
  color: white;
  font-size: 24rpx;
}

.level {
  color: #ffd700;
  font-size: 20rpx;
}

/* 中间区域 */
.hero-display {
  flex: 1;
  position: relative;
  margin: 20rpx;
  border-radius: 20rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-icon {
  width: 60rpx;
  height: 60rpx;
  border: 4rpx solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: rotate 1s linear infinite;
}

.loading-text {
  color: white;
  margin-left: 20rpx;
  font-size: 32rpx;
}

/* 底部区域 */
.bottom-section {
  height: 20vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20rpx;
}

.team {
  display: flex;
  gap: 10rpx;
}

.hero-placeholder {
  width: 80rpx;
  height: 80rpx;
  border-radius: 10rpx;
}

.vs-text {
  color: white;
  font-size: 48rpx;
  margin: 0 40rpx;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
</style>